home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
FP_OFF.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
309 b
|
15 lines
#include <stdio.h>
#include <dos.h>
char sample[] = "Test string";
main()
{
void far *ps;
unsigned off_sample;
/* Cast the address of the first character as a far pointer */
ps = (void far *)sample;
off_sample = FP_OFF(ps);
printf("The offset of the string is: %x\n",
off_sample);
}